package com.chuyangc.controller;

import com.chuyangc.entity.OrderItem;
import com.chuyangc.service.OrderItemService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 欧楚杨
 */
@RestController
@RequestMapping("order-item")
public class OrderItemController {
    private final OrderItemService orderItemService;

    OrderItemController(OrderItemService orderItemService){
        this.orderItemService = orderItemService;
    }

    @GetMapping("selectAll")
    public List<OrderItem> selectAll(){
        return orderItemService.list();
    }
}
